
const mongoose = require('mongoose');

mongoose.connect('mongodb://localhost:27017/CLDB');


let db = mongoose.connection;

db.on('connected',()=>console.log( 'mongoDB连接成功' ))
db.on('disconnected',()=>console.log( 'mongoDB连接失败' ))
